<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
session_start();
class Politique_confidentialite extends CI_Controller {
        function __construct()
	    {
		parent::__construct();
                $this->load->helper('url');
                $this->load->library('session');
                $this->load->library('lang');
                $this->load->library('uri');
            }
        function index(){
                 if(isset($_SESSION['lg'])) { 
                     $lg=$_SESSION['lg'];
                     $this->lang->load('lien',$lg);
                     echo base_url("/");
                 } else {
                if($this->agent->accept_lang('fr')){
                        $_SESSION['lg']='fr';
                        $this->lang->load('lien','fr');
                        $this->load->view('routeur/rt_politic');
                }elseif ($this->agent->accept_lang('de')) {
                        $_SESSION['lg']='de';
                        $this->lang->load('lien','de');
                        $this->load->view('routeur/rt_politic');
                    } else {
                        $_SESSION['lg']='en';
                        $this->lang->load('lien','en');
                        $this->load->view('routeur/rt_politic');
                    }
                
                }  
                
            }
            function politique(){
                    $lg = $this->uri->segment(1,0);
                    $this->lang->load('header',$lg);
                    $this->lang->load('lien',$lg);
                    $this->lang->load('container',$lg);
                    $this->lang->load('footer',$lg);
                    $this->load->view('stdr/vue_politique_confidentialite');
                    $_SESSION['lg']=$lg;
            }
}
